package org.xg.study.pd.visitor.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xg.study.pd.user.impl.Student;
import org.xg.study.pd.user.impl.Teacher;
import org.xg.study.pd.visitor.Visitor;

/**
 * @author CMG
 * @version 1.0
 * @description
 * @cLassName Principal
 * @date 2021/9/18 10:26
 **/
public class Principal implements Visitor {
    private Logger logger = LoggerFactory.getLogger(Principal.class);

    @Override
    public void visit(Student student) {
        logger.info("学生信息 姓名：{} 班级：{}", student.name, student.clazz);
    }

    @Override
    public void visit(Teacher teacher) {
        logger.info("老师信息 姓名：{} 班级：{} 升学率：{}", teacher.name, teacher.clazz, teacher.entranceRatio());
    }
}
